home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bvcdoptions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  8.4 KB  |  378 lines

  1. /*
  2. *
  3. * $Id: k3bvcdoptions.h 619556 2007-01-03 17:38:12Z trueg $
  4. * Copyright (C) 2003-2004 Christian Kvasny <chris@k3b.org>
  5. *
  6. * This file is part of the K3b project.
  7. * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. * See the file "COPYING" for the exact licensing terms.
  14. */
  15.  
  16. #ifndef K3B_VCD_OPTIONS_H
  17. #define K3B_VCD_OPTIONS_H
  18.  
  19. #include <qstring.h>
  20. #include "k3b_export.h"
  21.  
  22. class KConfigBase;
  23.  
  24. class LIBK3B_EXPORT K3bVcdOptions
  25. {
  26.     public:
  27.         K3bVcdOptions();
  28.         const QString& volumeId() const
  29.         {
  30.             return m_volumeID;
  31.         }
  32.         const QString& albumId() const
  33.         {
  34.             return m_albumID;
  35.         }
  36.         const QString& volumeSetId() const
  37.         {
  38.             return m_volumeSetId;
  39.         }
  40.         const QString& preparer() const
  41.         {
  42.             return m_preparer;
  43.         }
  44.         const QString& publisher() const
  45.         {
  46.             return m_publisher;
  47.         }
  48.  
  49.         const QString& applicationId() const
  50.         {
  51.             return m_applicationId;
  52.         }
  53.         const QString& systemId() const
  54.         {
  55.             return m_systemId;
  56.         }
  57.  
  58.         const QString& vcdClass() const
  59.         {
  60.             return m_vcdclass;
  61.         }
  62.         const QString& vcdVersion() const
  63.         {
  64.             return m_vcdversion;
  65.         }
  66.  
  67.         const int PreGapLeadout()
  68.         {
  69.             return m_pregapleadout;
  70.         }
  71.         const int PreGapTrack()
  72.         {
  73.             return m_pregaptrack;
  74.         }
  75.         const int FrontMarginTrack()
  76.         {
  77.             return m_frontmargintrack;
  78.         }
  79.         const int RearMarginTrack()
  80.         {
  81.             return m_rearmargintrack;
  82.         }
  83.         const int FrontMarginTrackSVCD()
  84.         {
  85.             return m_frontmargintrackSVCD;
  86.         }
  87.         const int RearMarginTrackSVCD()
  88.         {
  89.             return m_rearmargintrackSVCD;
  90.         }
  91.  
  92.         const int mpegVersion() const
  93.         {
  94.             return m_mpegversion;
  95.         }
  96.  
  97.         const int volumeCount() const
  98.         {
  99.             return m_volumeCount;
  100.         }
  101.         const int volumeNumber() const
  102.         {
  103.             return m_volumeNumber;
  104.         }
  105.  
  106.         const bool AutoDetect() const
  107.         {
  108.             return m_autodetect;
  109.         }
  110.         const bool CdiSupport() const
  111.         {
  112.             return m_cdisupport;
  113.         }
  114.         const bool NonCompliantMode() const
  115.         {
  116.             return m_brokensvcdmode;
  117.         }
  118.         const bool VCD30interpretation() const
  119.         {
  120.             return m_VCD30interpretation;
  121.         }
  122.         const bool Sector2336() const
  123.         {
  124.             return m_sector2336;
  125.         }
  126.         const bool UpdateScanOffsets() const
  127.         {
  128.             return m_updatescanoffsets;
  129.         }
  130.         const bool RelaxedAps() const
  131.         {
  132.             return m_relaxedaps;
  133.         }
  134.         const bool UseGaps() const
  135.         {
  136.             return m_usegaps;
  137.         }
  138.         const unsigned long long CDIsize() const
  139.         {
  140.             return m_cdisize;
  141.         }
  142.  
  143.         void setAlbumId( const QString& s )
  144.         {
  145.             m_albumID = s;
  146.         }
  147.         void setVolumeId( const QString& s )
  148.         {
  149.             m_volumeID = s;
  150.         }
  151.         void setVolumeSetId( const QString& s )
  152.         {
  153.             m_volumeSetId = s;
  154.         }
  155.         void setPreparer( const QString& s )
  156.         {
  157.             m_preparer = s;
  158.         }
  159.         void setPublisher( const QString& s )
  160.         {
  161.             m_publisher = s;
  162.         }
  163.  
  164.         void setVcdClass( const QString& s )
  165.         {
  166.             m_vcdclass = s;
  167.         }
  168.         void setVcdVersion( const QString& s )
  169.         {
  170.             m_vcdversion = s;
  171.         }
  172.  
  173.         void setPreGapLeadout( const int i )
  174.         {
  175.             m_pregapleadout = i;
  176.         }
  177.         void setPreGapTrack( const int i )
  178.         {
  179.             m_pregaptrack = i;
  180.         }
  181.         void setFrontMarginTrack( const int i )
  182.         {
  183.             m_frontmargintrack = i;
  184.         }
  185.         void setRearMarginTrack( const int i )
  186.         {
  187.             m_rearmargintrack = i;
  188.         }
  189.         void setFrontMarginTrackSVCD( const int i )
  190.         {
  191.             m_frontmargintrackSVCD = i;
  192.         }
  193.         void setRearMarginTrackSVCD( const int i )
  194.         {
  195.             m_rearmargintrackSVCD = i;
  196.         }
  197.  
  198.         void setMpegVersion( const int v )
  199.         {
  200.             m_mpegversion = v;
  201.         }
  202.         void setVolumeCount( const int c )
  203.         {
  204.             m_volumeCount = c;
  205.         }
  206.         void setVolumeNumber( const int n )
  207.         {
  208.             m_volumeNumber = n;
  209.         }
  210.  
  211.         void setAutoDetect( const bool& b )
  212.         {
  213.             m_autodetect = b;
  214.         }
  215.         void setCdiSupport( const bool& b )
  216.         {
  217.             m_cdisupport = b;
  218.         }
  219.         void setNonCompliantMode( const bool& b )
  220.         {
  221.             m_brokensvcdmode = b;
  222.         }
  223.         void setVCD30interpretation( const bool& b )
  224.         {
  225.             m_VCD30interpretation = b;
  226.         }
  227.         void setSector2336( const bool& b )
  228.         {
  229.             m_sector2336 = b;
  230.         }
  231.         void setUpdateScanOffsets( const bool& b )
  232.         {
  233.             m_updatescanoffsets = b;
  234.         }
  235.         void setRelaxedAps( const bool& b )
  236.         {
  237.             m_relaxedaps = b;
  238.         }
  239.         void setUseGaps( const bool& b )
  240.         {
  241.             m_usegaps = b;
  242.         }
  243.  
  244.         bool checkCdiFiles();
  245.         void save( KConfigBase* c );
  246.  
  247.         static K3bVcdOptions load( KConfigBase* c );
  248.         static K3bVcdOptions defaults();
  249.  
  250.         void setPbcEnabled( const bool& b )
  251.         {
  252.             m_pbcenabled = b;
  253.         }
  254.         bool PbcEnabled() const
  255.         {
  256.             return m_pbcenabled;
  257.         };
  258.         void setPbcNumkeysEnabled( const bool& b )
  259.         {
  260.             m_pbcnumkeysenabled = b;
  261.         }
  262.         bool PbcNumkeysEnabled() const
  263.         {
  264.             return m_pbcnumkeysenabled;
  265.         };
  266.  
  267.         void setPbcPlayTime( const int i )
  268.         {
  269.             m_def_pbcplaytime = i;
  270.         }
  271.         int PbcPlayTime( )
  272.         {
  273.             return m_def_pbcplaytime;
  274.         }
  275.  
  276.         void setPbcWaitTime( const int i )
  277.         {
  278.             m_def_pbcwaittime = i;
  279.         }
  280.         int PbcWaitTime( )
  281.         {
  282.             return m_def_pbcwaittime;
  283.         }
  284.  
  285.         void setSegmentFolder( const bool& b )
  286.         {
  287.             m_segmentfolder = b;
  288.         }
  289.         bool SegmentFolder() const
  290.         {
  291.             return m_segmentfolder;
  292.         };
  293.  
  294.         void setRestriction( const int i )
  295.         {
  296.             m_restriction = i;
  297.         }
  298.         int Restriction() const
  299.         {
  300.             return m_restriction;
  301.         };
  302.         void increaseSegments( )
  303.         {
  304.             m_segment += 1;
  305.         }
  306.         void decreaseSegments( )
  307.         {
  308.             m_segment -= 1;
  309.         }
  310.         bool haveSegments() const
  311.         {
  312.             return m_segment > 0;
  313.         };
  314.         void increaseSequence( )
  315.         {
  316.             m_sequence += 1;
  317.         }
  318.         void decreaseSequence( )
  319.         {
  320.             m_sequence -= 1;
  321.         }
  322.  
  323.         bool haveSequence() const
  324.         {
  325.             return m_sequence > 0;
  326.         };
  327.  
  328.     private:
  329.         int m_restriction;
  330.         int m_segment;
  331.         int m_sequence;
  332.  
  333.         // pbc
  334.         bool m_pbcenabled;
  335.         bool m_pbcnumkeysenabled;
  336.  
  337.         // volume descriptor
  338.         QString m_volumeID;
  339.         QString m_albumID;
  340.         QString m_volumeSetId;
  341.  
  342.         QString m_preparer;
  343.         QString m_publisher;
  344.  
  345.         QString m_applicationId;
  346.         QString m_systemId;
  347.  
  348.         QString m_vcdclass;
  349.         QString m_vcdversion;
  350.  
  351.         int m_pregapleadout;
  352.         int m_pregaptrack;
  353.         int m_frontmargintrack;
  354.         int m_rearmargintrack;
  355.         int m_frontmargintrackSVCD;
  356.         int m_rearmargintrackSVCD;
  357.  
  358.         int m_mpegversion;
  359.         int m_volumeCount;
  360.         int m_volumeNumber;
  361.  
  362.         bool m_autodetect;
  363.         bool m_cdisupport;
  364.         bool m_brokensvcdmode;
  365.         bool m_VCD30interpretation;
  366.         bool m_sector2336;
  367.         bool m_updatescanoffsets;
  368.         bool m_relaxedaps;
  369.         bool m_segmentfolder;
  370.         bool m_usegaps;
  371.  
  372.         int m_def_pbcplaytime;
  373.         int m_def_pbcwaittime;
  374.         unsigned long long m_cdisize;
  375. };
  376.  
  377. #endif
  378.